package hk.com.fgoproduction.getdroplets.Lib.Common.ToolInstance

import android.content.Context
import android.widget.Toast

object ToastInstance {
    private var toast: Toast? = null

    fun show(context: Context, text: String, duration: Int = Toast.LENGTH_SHORT) {
        if (toast != null)
            toast!!.cancel()
        toast = Toast.makeText(context, text, duration)
        toast?.show()
    }
}